﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="downloadDialog.aspx.cs" Inherits="newproduct_productdialog_downloadDialog" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="css/dialog.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.4.1.min.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
   <table width="358" border="0" cellspacing="0" cellpadding="0">
<%--      <tr>
        <td class="dg_t_l"></td>
        <td class="dg_c"></td>
        <td class="dg_t_r"></td>
      </tr>--%>
      <tr>
       <%-- <td class="dg_m"></td>--%>
        <td><div class="dg_k font14">
            <ul>
              <li class="dg_k_1 white"><strong>选择适合您的版本</strong> <a href="#" class="dg_close img" onclick="close_W()"></a>
              </li>
              <li class="dg_k_4"></li>
              <li class="dg_sj img">按品牌下载</li>
              <li class="dg_k_3 font12 dg_k_5">您的手机品牌：
                <select name="select" id="sel_mobil_list" style="width:150px">
                  <option>请选择手机品牌</option>
                </select>
              </li>
              <li class="dg_k_3 font12 dg_k_5">您的手机型号：
                <select name="select" id="sel_mobil_type_list"  style="width:150px">
                  <option>请选择手机型号</option>
                </select>
              </li>
			  <li class="dg_k_3 font12">适合您的版本为：<span id="selbandver" style="color:Red">&nbsp;</span></li>
			  <li class="dg_k_2">
               <input type="button" name="Submit23" class="an3 img" value="下载至电脑"  id="down_url" style="cursor:pointer"/>
              </li>
			  <li class="dg_sj img">按平台下载</li>
			  <li class="dg_k_6">
			    <table width="307" border="0" cellpadding="2" cellspacing="1" bgcolor="#898989" class="font12">
                  <tr>
                    <td colspan="2" align="center" bgcolor="#FFFFFF">Android</td>
                    <td bgcolor="#FFFFFF"><a href="http://cell.emoney.cn/new/l2/eStockL2.apk" class="b" target="_blank">Android版</a></td>
                  </tr>
                  <tr>
                    <td colspan="2" align="center" bgcolor="#FFFFFF">iphone</td>
                    <td bgcolor="#FFFFFF"><a href="http://cell.emoney.cn/new/l2/eStockL2.apk" class="b" target="_blank">PXL文件下载</a>  
                    <a href="http://cell.emoney.cn/new/l2/eStock.app.ipa" class="b" target="_blank">IPA文件下载</a></td>
                  </tr>
                  <tr>
                    <td colspan="2" align="center" bgcolor="#FFFFFF">SYMBIAN</td>
                    <td bgcolor="#FFFFFF"><a href="http://wap.emoney.cn/l2/sis/eStock_2.sis" class="b" target="_blank">第二版</a> 
                    <a href="http://cell.emoney.cn/l2/sis/eStock_3.sisx" class="b" target="_blank">第三版</a> 
                    <a href="http://cell.emoney.cn/l2/sis/eStock_5th.sisx" class="b" target="_blank">第五版</a></td>
                  </tr>
                  <tr>
                    <td rowspan="4" align="center" bgcolor="#FFFFFF">JAVA</td>
                    <td align="center" bgcolor="#FFFFFF">大屏(触摸)</td>
                    <td bgcolor="#FFFFFF"><a href="http://cell.emoney.cn/new/l2/cmp/eStock.jar" class="b" target="_blank">JAR下载</a>  
                     <a href="http://cell.emoney.cn/new/l2/cmp/eStock.jad" class="b" target="_blank">JAD下载</a></td>
                  </tr>
                  <tr>
                    <td align="center" bgcolor="#FFFFFF">大屏(按键)</td>
                    <td bgcolor="#FFFFFF"><a href="http://cell.emoney.cn/new/l2/eStock.jar" class="b" target="_blank">JAR下载</a>   
                    <a href="http://cell.emoney.cn/new/l2/eStock.jad" class="b" target="_blank">JAD下载</a></td>
                  </tr>
                  <tr>
                    <td align="center" bgcolor="#FFFFFF">小屏(触摸)</td>
                    <td bgcolor="#FFFFFF"><a href="http://cell.emoney.cn/new/l2/java_normal/cmp/eStock.jar" class="b" target="_blank">JAR下载</a> 
                      <a href="http://cell.emoney.cn/new/l2/java_normal/cmp/eStock.jad" class="b" target="_blank">JAD下载</a></td>
                  </tr>
                  <tr>
                    <td align="center" bgcolor="#FFFFFF">小屏(按键)</td>
                    <td bgcolor="#FFFFFF"><a href="http://cell.emoney.cn/new/l2/java_normal/normal/eStock.jar" class="b" target="_blank">JAR下载</a> 
                      <a href="http://cell.emoney.cn/new/l2/java_normal/normal/eStock.jad" class="b" target="_blank">JAD下载</a></td>
                  </tr>
                  <tr>
                    <td colspan="2" rowspan="2" align="center" bgcolor="#FFFFFF">Windows Mobile</td>
                    <td bgcolor="#FFFFFF"><a href="http://cell.emoney.cn/l2/ppc/ymStockL2.B0025_264.CAB" class="b" target="_blank">PPC（低分辨率）</a>
                    <a href="http://cell.emoney.cn/l2/ppc/ymStockL2.B0025_VGA_264.CAB" class="b" target="_blank">PPC（高分辨率）</a></td>
                  </tr>
                  <tr>
                    <td bgcolor="#FFFFFF"><a href="http://cell.emoney.cn/l2/download/smartphone/Stock.CAB" class="b" target="_blank">Smartphone</a></td>
                  </tr>
                  <tr>
                    <td colspan="2" align="center" bgcolor="#FFFFFF">Blackberry</td>
                    <td bgcolor="#FFFFFF"><a href="http://cell.emoney.cn/new/l2/bb/eStock.cod" class="b" target="_blank">COD格式下载</a>   
                    <a href="http://cell.emoney.cn/new/l2/bb/eStock.alx" class="b" target="_blank">ALX格式下载</a></td>
                  </tr>
                </table>
			  </li>
			  <li class="dg_k_4"></li>
            </ul>
        </div></td>
      <%--  <td class="dg_m">&nbsp;</td>--%>
      </tr>
<%--      <tr>
        <td class="dg_b_l"></td>
        <td class="dg_c"></td>
        <td class="dg_b_r"></td>
      </tr>--%>
    </table>
    <input id="down_href" type="hidden" />
    </form>
    <script type="text/javascript">
        $(document).ready(function () {
            $.post("handler/Mobile_List.ashx", {}, function (data) {
                if (data != "") {
                    var array = data.split("|");
                    for (var i = 0; i < array.length; i++) {
                        var args = array[i].split(",");
                        if (args[0] != "") {
                            $("#sel_mobil_list").append("<option value=" + args[0] + ">" + args[1] + "</option>");
                        }
                    }

                }
                else {
                    $("#sel_mobil_list").append("<option value='sjds'>数据丢失</option>");
                }

            }); //初始化手机品牌


            $("#sel_mobil_list").change(function () {
                var mobile_id = $("#sel_mobil_list").val();
                $("#sel_mobil_type_list option[name='select2']").remove();
                $.post("handler/MobileType_List.ashx", { mobile_id: mobile_id }, function (data) {

                    if (data != "") {

                        var array = data.split("|");
                        for (var i = 0; i < array.length; i++) {
                            var args = array[i].split(",");
                            if (args[0] != "") {
                                $("#sel_mobil_type_list").append("<option value=" + args[0] + " name='select2'>" + args[1] + "</option>");
                            }
                        } //获取对应手机品牌下的手机型号

                    }
                    else {
                        $("#sel_mobil_type_list").append("<option value='sjds' name='select2'>数据丢失</option>");
                    }


                })
            })

            $("#sel_mobil_type_list").change(function () {
                var m_id = $("#sel_mobil_type_list").val();
                $.post("handler/DownVersionByM_ID.ashx", { m_id: m_id }, function (data) {
                    if (data != "") {
                        var array = data.split(",");
                        $("#selbandver").html(array[0]);  //适合的版本
                        $("#down_url").attr("title", array[1]); //链接标题
                        // $("#down_url").attr("href", array[2]); //下载链接地址
                        $("#down_href").val(array[2]);
                    }

                })

            })


            $("#down_url").click(function () {
                var down_href = $("#down_href").val();
                if (down_href == "") {
                    alert("没有找到适合的版本!");
                    return false;
                }
                window.open(down_href);
                return false;
            })

        })






        function close_W() 
        {
            window.parent.close_W();
        }
    </script>
</body>
</html>
